{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 使用原始文本学习词嵌入空间\n",
    "获取词嵌入有两种方法：\n",
    "1. 在完成主任务（如本例中的评论分类）的同时学习词嵌入。这种方式一开始使用随机词向量，通过完成任务的过程对词向量进行学习，类似权重学习，通过梯度下降完成。\n",
    "2. 在其他机器学习任务上得到词嵌入，将外面项目学到的词嵌入加载到本模型中直接利用，即**预训练词嵌入**<br>\n",
    "\n",
    "本例使用第一种方法。由于自然语言具有特定的情境，法律类别的文本与评论类别的文本就有很大的差异，产生的词嵌入空间也可能差距很大，因为语义在不同的空间里可能会非常不同。如果语料充足，比较合理的做法还是重新学校新的嵌入空间。\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Using TensorFlow backend.\n",
      "C:\\Anaconda\\envs\\keras\\lib\\site-packages\\tensorflow\\python\\framework\\dtypes.py:526: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
      "  _np_qint8 = np.dtype([(\"qint8\", np.int8, 1)])\n",
      "C:\\Anaconda\\envs\\keras\\lib\\site-packages\\tensorflow\\python\\framework\\dtypes.py:527: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
      "  _np_quint8 = np.dtype([(\"quint8\", np.uint8, 1)])\n",
      "C:\\Anaconda\\envs\\keras\\lib\\site-packages\\tensorflow\\python\\framework\\dtypes.py:528: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
      "  _np_qint16 = np.dtype([(\"qint16\", np.int16, 1)])\n",
      "C:\\Anaconda\\envs\\keras\\lib\\site-packages\\tensorflow\\python\\framework\\dtypes.py:529: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
      "  _np_quint16 = np.dtype([(\"quint16\", np.uint16, 1)])\n",
      "C:\\Anaconda\\envs\\keras\\lib\\site-packages\\tensorflow\\python\\framework\\dtypes.py:530: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
      "  _np_qint32 = np.dtype([(\"qint32\", np.int32, 1)])\n",
      "C:\\Anaconda\\envs\\keras\\lib\\site-packages\\tensorflow\\python\\framework\\dtypes.py:535: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
      "  np_resource = np.dtype([(\"resource\", np.ubyte, 1)])\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "'2.3.1'"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import keras\n",
    "keras.__version__"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 电影评论分类：二分类问题\n",
    "判断评论是正面还是负面"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# IMDB 数据集\n",
    "IMDB 数据集，它包含来自互联网电影数据库（IMDB）的 50 000 条严重两极分化的评论。数据集被分为用于训练的 25 000 条评论与用于测试的 25 000 条评论，训练集和测试集都包含 50% 的正面评论和 50% 的负面评论。\n",
    "\n",
    "与 MNIST 数据集一样，IMDB 数据集也内置于 Keras 库。它已经过**预处理**：评论（单词序列） **已经被转换为整数序列**，其中每个整数代表字典中的某个单词。 下列代码将会加载 IMDB 数据集（第一次运行时会下载大约 80MB 的数据，可以不翻墙，反复试几次）。\n",
    "\n",
    "参数 num_words=10000 的意思是仅保留训练数据中前 10 000 个最常出现的单词。**低频单词将被舍弃**。这样得到的向量数据不会太大，便于处理。\n",
    "\n",
    "train_data 和 test_data 这两个变量都是评论组成的列表，每条评论又是单词索引组成 的列表（表示一系列单词）。train_labels 和 test_labels 都是 0 和 1 组成的列表，其中 0 代表负面（negative），1 代表正面（positive）。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "imdb.npz 数据集被单独下载存放在：C:\\Users\\xxxxxx\\.keras\\datasets"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "from keras.datasets import imdb\n",
    "\n",
    "(train_data, y_train), (test_data, y_test) = imdb.load_data(num_words=10000)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(25000,)"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "test_data.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1\n",
      "[1, 14, 22, 16, 43, 530, 973, 1622, 1385, 65, 458, 4468, 66, 3941, 4, 173, 36, 256, 5, 25, 100, 43, 838, 112, 50, 670, 2, 9, 35, 480, 284, 5, 150, 4, 172, 112, 167, 2, 336, 385, 39, 4, 172, 4536, 1111, 17, 546, 38, 13, 447, 4, 192, 50, 16, 6, 147, 2025, 19, 14, 22, 4, 1920, 4613, 469, 4, 22, 71, 87, 12, 16, 43, 530, 38, 76, 15, 13, 1247, 4, 22, 17, 515, 17, 12, 16, 626, 18, 2, 5, 62, 386, 12, 8, 316, 8, 106, 5, 4, 2223, 5244, 16, 480, 66, 3785, 33, 4, 130, 12, 16, 38, 619, 5, 25, 124, 51, 36, 135, 48, 25, 1415, 33, 6, 22, 12, 215, 28, 77, 52, 5, 14, 407, 16, 82, 2, 8, 4, 107, 117, 5952, 15, 256, 4, 2, 7, 3766, 5, 723, 36, 71, 43, 530, 476, 26, 400, 317, 46, 7, 4, 2, 1029, 13, 104, 88, 4, 381, 15, 297, 98, 32, 2071, 56, 26, 141, 6, 194, 7486, 18, 4, 226, 22, 21, 134, 476, 26, 480, 5, 144, 30, 5535, 18, 51, 36, 28, 224, 92, 25, 104, 4, 226, 65, 16, 38, 1334, 88, 12, 16, 283, 5, 16, 4472, 113, 103, 32, 15, 16, 5345, 19, 178, 32]\n"
     ]
    }
   ],
   "source": [
    "print(y_train[0])\n",
    "print(train_data[0])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "9999"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#对于训练数据，求它们的最大值，由于单词不超过1000个，因此单词编号（索引不会超过1000）\n",
    "max([max(sequence) for sequence in train_data])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "由于数据集给出的每个单词都是一个索引。我们可以将这个索引号对应的单词找出来形成一个单词和索引的字典。reverse_word_index，这个就是输入索引（key），得到单词（value）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 如果好奇的话，你可以用下列代码将索引解码为单词\n",
    "# word_index 是一个将单词映射为整数索引的字典\n",
    "word_index = imdb.get_word_index()\n",
    "# 键值颠倒，将整数索引映射为单词\n",
    "reverse_word_index = dict([(value, key) for (key, value) in word_index.items()])\n",
    "# We decode the review; note that our indices were offset by 3\n",
    "# because 0, 1 and 2 are reserved indices for \"padding\", \"start of sequence\", and \"unknown\".\n",
    "#将评论解码。注意，索引减去了 3，\n",
    "# 因为 0、1、2 是为“padding”（填充）、“start of sequence”（序列开始）、“unknown”（未知词）分别保留的索引\n",
    "decoded_review = ' '.join([reverse_word_index.get(i - 3, '?') for i in train_data[0]])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\"? this film was just brilliant casting location scenery story direction everyone's really suited the part they played and you could just imagine being there robert ? is an amazing actor and now the same being director ? father came from the same scottish island as myself so i loved the fact there was a real connection with this film the witty remarks throughout the film were great it was just brilliant so much that i bought the film as soon as it was released for ? and would recommend it to everyone to watch and the fly fishing was amazing really cried at the end it was so sad and you know what they say if you cry at a film it must have been good and this definitely was also ? to the two little boy's that played the ? of norman and paul they were just brilliant children are often left out of the ? list i think because the stars that play them all grown up are such a big profile for the whole film but these children are amazing and should be praised for what they have done don't you think the whole story was so lovely because it was true and was someone's life after all that was shared with us all\""
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "decoded_review "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\"? big hair big boobs bad music and a giant safety pin these are the words to best describe this terrible movie i love cheesy horror movies and i've seen hundreds but this had got to be on of the worst ever made the plot is paper thin and ridiculous the acting is an abomination the script is completely laughable the best is the end showdown with the cop and how he worked out who the killer is it's just so damn terribly written the clothes are sickening and funny in equal ? the hair is big lots of boobs ? men wear those cut ? shirts that show off their ? sickening that men actually wore them and the music is just ? trash that plays over and over again in almost every scene there is trashy music boobs and ? taking away bodies and the gym still doesn't close for ? all joking aside this is a truly bad film whose only charm is to look back on the disaster that was the 80's and have a good old laugh at how bad everything was back then\""
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "decoded_review = ' '.join([reverse_word_index.get(i - 3, '?') for i in train_data[1]])\n",
    "decoded_review"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "maxlen = 50"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "from keras import preprocessing\n",
    "\n",
    "#将整数列表转为samples，maxlen（20）的二维张量\n",
    "x_train = preprocessing.sequence.pad_sequences(train_data, maxlen = maxlen)\n",
    "x_test =  preprocessing.sequence.pad_sequences(test_data, maxlen = maxlen)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "x_train: (25000, 50)\n",
      "x_test: (25000, 50)\n"
     ]
    }
   ],
   "source": [
    "print(\"x_train:\", x_train.shape)\n",
    "print(\"x_test:\", x_test.shape)"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 创建网络\n",
    "<img src=\"images/1.JPG\" style=\"width:1000px;height:350px;\" ><br>\n",
    "不太明白的地方就是，吴恩达的教程中，输入的是one-hot编码，但是这里好像没有做这个预处理（是在嵌入层里面做的？）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "WARNING:tensorflow:From C:\\Anaconda\\envs\\keras\\lib\\site-packages\\tensorflow\\python\\ops\\resource_variable_ops.py:435: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Colocations handled automatically by placer.\n"
     ]
    }
   ],
   "source": [
    "from keras.models import Sequential\n",
    "from keras.layers import Flatten, Dense, Embedding\n",
    "\n",
    "model = Sequential()\n",
    "model.add(Embedding(10000, 16, input_length = maxlen))\n",
    "model.add(Flatten())\n",
    "model.add(Dense(1, activation='sigmoid'))"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<img src=\"images/2.JPG\" style=\"width:1200px;height:400px;\" ><br>"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Model: \"sequential_1\"\n",
      "_________________________________________________________________\n",
      "Layer (type)                 Output Shape              Param #   \n",
      "=================================================================\n",
      "embedding_1 (Embedding)      (None, 50, 16)            160000    \n",
      "_________________________________________________________________\n",
      "flatten_1 (Flatten)          (None, 800)               0         \n",
      "_________________________________________________________________\n",
      "dense_1 (Dense)              (None, 1)                 801       \n",
      "=================================================================\n",
      "Total params: 160,801\n",
      "Trainable params: 160,801\n",
      "Non-trainable params: 0\n",
      "_________________________________________________________________\n"
     ]
    }
   ],
   "source": [
    "model.compile(optimizer='rmsprop',\n",
    "              loss='binary_crossentropy',\n",
    "              metrics=['accuracy'])\n",
    "model.summary()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "WARNING:tensorflow:From C:\\Anaconda\\envs\\keras\\lib\\site-packages\\tensorflow\\python\\ops\\math_ops.py:3066: to_int32 (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Use tf.cast instead.\n",
      "Train on 20000 samples, validate on 5000 samples\n",
      "Epoch 1/10\n",
      "20000/20000 [==============================] - 1s 50us/step - loss: 0.6164 - accuracy: 0.6843 - val_loss: 0.4916 - val_accuracy: 0.7748\n",
      "Epoch 2/10\n",
      "20000/20000 [==============================] - 1s 50us/step - loss: 0.4063 - accuracy: 0.8241 - val_loss: 0.4137 - val_accuracy: 0.8052\n",
      "Epoch 3/10\n",
      "20000/20000 [==============================] - 1s 52us/step - loss: 0.3353 - accuracy: 0.8558 - val_loss: 0.4000 - val_accuracy: 0.8120\n",
      "Epoch 4/10\n",
      "20000/20000 [==============================] - 1s 46us/step - loss: 0.2952 - accuracy: 0.8748 - val_loss: 0.4001 - val_accuracy: 0.8164\n",
      "Epoch 5/10\n",
      "20000/20000 [==============================] - 1s 54us/step - loss: 0.2626 - accuracy: 0.8924 - val_loss: 0.4041 - val_accuracy: 0.8166\n",
      "Epoch 6/10\n",
      "20000/20000 [==============================] - 1s 50us/step - loss: 0.2318 - accuracy: 0.9078 - val_loss: 0.4120 - val_accuracy: 0.8126\n",
      "Epoch 7/10\n",
      "20000/20000 [==============================] - 1s 45us/step - loss: 0.2012 - accuracy: 0.9222 - val_loss: 0.4218 - val_accuracy: 0.8114\n",
      "Epoch 8/10\n",
      "20000/20000 [==============================] - 1s 52us/step - loss: 0.1714 - accuracy: 0.9384 - val_loss: 0.4397 - val_accuracy: 0.8070\n",
      "Epoch 9/10\n",
      "20000/20000 [==============================] - 1s 52us/step - loss: 0.1436 - accuracy: 0.9514 - val_loss: 0.4531 - val_accuracy: 0.8028\n",
      "Epoch 10/10\n",
      "20000/20000 [==============================] - 1s 55us/step - loss: 0.1182 - accuracy: 0.9644 - val_loss: 0.4695 - val_accuracy: 0.8002\n"
     ]
    }
   ],
   "source": [
    "history = model.fit(x_train,y_train,\n",
    "                    epochs=10,\n",
    "                    batch_size=32,\n",
    "                    validation_split=0.2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEWCAYAAABrDZDcAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAgAElEQVR4nO3deZwU5bX/8c9hlx0BQdkGVwQcYBwRLyTgGlxRoxEEt+hFjJpEk/zkZ7yJmvC6Rr1KUGNC8hOTSOQajcp1Iy4kaJKLDKsCIogIIyiLgiCgznB+fzw1Mz1DzzDAVHcP9X2/Xv3qrqqnq083zHOqnqo6Ze6OiIgkV4NsByAiItmlRCAiknBKBCIiCadEICKScEoEIiIJp0QgIpJwSgRSp8ysoZltM7Puddk2m8zsSDOr8/Oszew0M1uVMr3MzL5Wm7b78Fm/M7Nb9/X9Naz352b2aF2vVzKrUbYDkOwys20pk82BL4DSaPpad5+6N+tz91KgZV23TQJ3P6Yu1mNm1wBj3H1YyrqvqYt1y4FJiSDh3L28I462OK9x91eqa29mjdy9JBOxiUhmaGhIahTt+v+3mT1uZ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XZZ+4+EHiQUDWV6PUf3D0fmApMiuZPAv7u7v0I9YIWR/OPAh5y9z7AZuCb0fzxwIBoPePi+nIi1dGVxSIRM9vm7i3TzF8FnOLuK6OigR+5e3sz2wgc6u5fRfPXuXsHM9sAdHX3L1LWkQe8HN1QBDO7BWjs7j83s5eAbcAzwDPuvi3mrypSifYIRGrHq3ldXZt0vkh5XUrFMbqzgYeA44G50Y1YRDJGiUCkdi5Jef5X9PqfVNw+cTTwRvT6VeA6KL8nc+vqVmpmDYBu7j6TcJOetsBueyUicdKWh0iFg1KqwkK4f3DZKaRNzWw2YeNpVDTvu8AjZvYjwt3FyqqFfg+YHFWILCUkhXXVfGZD4DEzawMYcL9uUSmZpmMEInsQHSModPeN2Y5FJA4aGhIRSTjtEYiIJJz2CEREEk6JQEQk4ZQIREQSTolARCThlAhERBLu/wNh7Il+9Otc5AAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "\n",
    "acc = history.history['accuracy']\n",
    "val_acc = history.history['val_accuracy']\n",
    "loss = history.history['loss']\n",
    "val_loss = history.history['val_loss']\n",
    "\n",
    "epochs = range(1, len(acc) + 1)\n",
    "\n",
    "# \"bo\" is for \"blue dot\"（'bo' 表示蓝色圆点）\n",
    "plt.plot(epochs, loss, 'bo', label='Training loss')\n",
    "# b is for \"solid blue line\"（'b' 表示蓝色实线）\n",
    "plt.plot(epochs, val_loss, 'b', label='Validation loss')\n",
    "plt.title('Training and validation loss')\n",
    "plt.xlabel('Epochs')\n",
    "plt.ylabel('Loss')\n",
    "plt.legend()\n",
    "\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAEWCAYAAAB8LwAVAAAABHNCSVQIC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55ZRTKCoqori4mLKyMgBuueUWhgwZQlFREdc3Zt1WROp0883QsWP1ZR07huWNRQkiSVO06SW8/fbbXHbZZcyZM4c+ffpw6623MmvWLObNm8cLL7zA22+/XWObTZs2ceKJJzJv3jyOPfZYHnzwwdh9uzszZszgtttuq0o2v/rVr9h///2ZN28ekyZNYs6cObHbXnPNNcycOZMFCxawadMmpk2bBsDYsWO59tprmTdvHq+//jr77bcfzzzzDM8++ywzZsxg3rx5fPe7322koyMi9Rk3DiZPhv79wSy8T57ceB3UoARRTVO06SUcfPDBHHXUUVXzjzzyCMXFxRQXF7N48eLYBNGhQwfOOOMMAI488siqX/GpxowZU6PM9OnTOf/88wEoKipi0KBBsdu+9NJLjBgxgqKiIl555RUWLVrExo0bWbduHWeeeSYQbmzr2LEjL774IpdeeikdOnQAYN99993zAyEiDTZuHJSVwa5d4b0xkwOoD6KapmjTS+jUqVPV9JIlS7jrrruYMWMG3bt358ILL4y9L6Bdu3ZV061bt6aysjJ23/vss0+NMuk8GGrbtm1MnDiRt956iz59+nDDDTdUxRF3Kaq76xJVkRZMNYgkTdGmF2fz5s106dKFrl27snr1ap577rlG/4yRI0fy2GOPAbBgwYLYGsr27dtp1aoVvXr1YsuWLTz++OMA9OjRg169evHMM88A4ebDbdu2MXr0aH7729+yfft2ADZs2NDocYvkokzfoJYrMpogzOx0M3vHzJaa2aSY9T3MbKqZzTezGWY2OGldmZktMLO5ZtYkD3loija9OMXFxRxxxBEMHjyYK664guOOO67RP+Pqq6/m/fffZ+jQodx+++0MHjyYbt26VSvTs2dPLrroIgYPHsw555zD0UcfXbWutLSU22+/naFDhzJy5EgqKir40pe+xOmnn05JSQnDhg3jl7/8ZaPHLZJrmupillyQsWdSm1lr4F3g80A5MBMY6+5vJ5W5Ddjq7v9jZocB97r7qGhdGVDi7uvS/cySkhJPfWDQ4sWLOfzww/f26zR7lZWVVFZW0r59e5YsWcLo0aNZsmQJbdrkRiuj/k7SXBQWxjdF9+8f+gGaGzOb7e4lces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9evWqtq/Zs2fz0EMP8eabb+LuHH300Zx44on06NGDJUuW8Mgjj/Cb3/yGr33tazz++ONceOGF1bYfOXIkb7zxBmbGAw88wM9//nNuv/12fvzjH9OtWzcWLFgAwMaNG6moqOCKK67g1VdfZcCAARqzSRqsriH586HTuKmpBtEEkpuZkpuX3J3rrruOoUOHcuqpp/L+++9X/RKP8+qrr1adqIcOHcrQoUOr1j322GMUFxczfPhwFi1aFDsYX7Lp06dzzjnn0KlTJzp37syYMWN47bXXABgwYADDhg0Dah9WvLy8nNNOO40hQ4Zw2223sWjRIgBefPHFak+469GjB2+88QYnnHACAwYMADQsuDRcPt3FnAvyqgZR1y/9TPryl7/Md77zHd566y22b99e9cu/tLSUiooKZs+eTdu2bSksLIwd5jtZXO1i+fLl/OIXv2DmzJn06NGDiy++uN791DUGV2K4cAhDhsc1MV199dV85zvf4ayzzuLvf/87N910U9V+U2PUsODSWPLpLuZcoBpEE+jcuTMnnXQSl156abXO6U2bNrHffvvRtm1bXn75ZVbE/ctPcsIJJ1AaNbYuXLiQ+fPnA2G48E6dOtGtWzfWrFnDs88+W7VNly5d2LJlS+y+nnzySbZt28ZHH33E1KlTOf7449P+Tps2baJPnz4A/P73v69aPnr0aO65556q+Y0bN3LsscfyyiuvsHz5ckDDgkvD5dNdzLlACaKJjB07lnnz5lU91Q1g3LhxzJo1i5KSEkpLSznssMPq3MeVV17J1q1bGTp0KD//+c8ZMSLcXF5UVMTw4cMZNGgQl156abXhwsePH88ZZ5xR1UmdUFxczMUXX8yIESM4+uijufzyyxk+fHja3+emm27iq1/9Kscff3y1/o0bbriBjRs3MnjwYIqKinj55ZcpKChg8uTJjBkzhqKiIs4777y0P0ckWT7dxZwLMjbcdzZouO/mS38nkeyoa7hv1SBERCSWEoSIiMTKiwTRkprRWiL9fURyU4tPEO3bt2f9+vU6CeUod2f9+vW0b98+26FIPTTERf5p8fdB9O3bl/LycioqKrIditSiffv29O3bN9thSB0SQ1wk7mJODHEBuoKoJWvxVzGJy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vRg14wsx8Abd39J2Y2DdgKPAk86e5bM/xVRapRDUJk73gt07WVifNx0vROdvcNfhG4FzgSmB09IEekyShBiOyd85Le/xlNv87ux2COA6ZH0y8BV0LVM7e71rZTM2sFHOTuLxMentQdqFGLEckk/SIRqV+HpFF2ITwfOnGp6z5m9ibhx9bYaNm3gAfN7D8JT4NLjL56DTA5GnFzJyFZrK7lM1sDD5tZN8CAX+pRo9LU1Ach0kBRH0SJu6/LdiwimaAmJhERiaUahIiIxFINQkREYilBiIhILCUIERGJpQQhIiKxlCBERCTW/wcz4d7KYimJUAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "acc_values = history.history['accuracy']\n",
    "val_acc_values = history.history['val_accuracy']\n",
    "plt.plot(epochs, acc, 'bo', label='Training acc')\n",
    "plt.plot(epochs, val_acc, 'b', label='Validation acc')\n",
    "plt.title('Training and validation accuracy')\n",
    "plt.xlabel('Epochs')\n",
    "plt.ylabel('accuracy')\n",
    "plt.legend()\n",
    "\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [],
   "source": [
    "from keras import preprocessing\n",
    "from keras.models import Sequential\n",
    "from keras.layers import Flatten, Dense, Embedding\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "def trainEmbed(maxlen, vectorlen):\n",
    "    #将整数列表转为samples，maxlen（20）的二维张量\n",
    "    x_train = preprocessing.sequence.pad_sequences(train_data, maxlen = maxlen)\n",
    "    x_test =  preprocessing.sequence.pad_sequences(test_data, maxlen = maxlen)\n",
    "    model = Sequential()\n",
    "    model.add(Embedding(10000, 8, input_length = maxlen))\n",
    "    model.add(Flatten())\n",
    "    model.add(Dense(1, activation='sigmoid'))\n",
    "    model.compile(optimizer='rmsprop',\n",
    "              loss='binary_crossentropy',\n",
    "              metrics=['accuracy'])\n",
    "    history = model.fit(x_train,y_train,\n",
    "                    epochs=10,\n",
    "                    batch_size=32,\n",
    "                    validation_split=0.2)\n",
    "    acc_values = history.history['accuracy']\n",
    "    val_acc_values = history.history['val_accuracy']\n",
    "    return val_acc_values\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Train on 20000 samples, validate on 5000 samples\n",
      "Epoch 1/10\n",
      "20000/20000 [==============================] - 1s 40us/step - loss: 0.6595 - accuracy: 0.6420 - val_loss: 0.6003 - val_accuracy: 0.7094\n",
      "Epoch 2/10\n",
      "20000/20000 [==============================] - 1s 46us/step - loss: 0.5297 - accuracy: 0.7567 - val_loss: 0.5204 - val_accuracy: 0.7346\n",
      "Epoch 3/10\n",
      "20000/20000 [==============================] - 1s 39us/step - loss: 0.4583 - accuracy: 0.7886 - val_loss: 0.4976 - val_accuracy: 0.7452\n",
      "Epoch 4/10\n",
      "20000/20000 [==============================] - 1s 39us/step - loss: 0.4194 - accuracy: 0.8120 - val_loss: 0.4916 - val_accuracy: 0.7564\n",
      "Epoch 5/10\n",
      "20000/20000 [==============================] - 1s 44us/step - loss: 0.3913 - accuracy: 0.8245 - val_loss: 0.4919 - val_accuracy: 0.7582\n",
      "Epoch 6/10\n",
      "20000/20000 [==============================] - 1s 38us/step - loss: 0.3677 - accuracy: 0.8392 - val_loss: 0.4967 - val_accuracy: 0.7592\n",
      "Epoch 7/10\n",
      "20000/20000 [==============================] - 1s 46us/step - loss: 0.3470 - accuracy: 0.8503 - val_loss: 0.5008 - val_accuracy: 0.7568\n",
      "Epoch 8/10\n",
      "20000/20000 [==============================] - 1s 47us/step - loss: 0.3278 - accuracy: 0.8605 - val_loss: 0.5090 - val_accuracy: 0.7544\n",
      "Epoch 9/10\n",
      "20000/20000 [==============================] - 1s 44us/step - loss: 0.3104 - accuracy: 0.8704 - val_loss: 0.5182 - val_accuracy: 0.7514\n",
      "Epoch 10/10\n",
      "20000/20000 [==============================] - 1s 45us/step - loss: 0.2945 - accuracy: 0.8795 - val_loss: 0.5247 - val_accuracy: 0.7538\n",
      "Train on 20000 samples, validate on 5000 samples\n",
      "Epoch 1/10\n",
      "20000/20000 [==============================] - 1s 52us/step - loss: 0.6509 - accuracy: 0.6492 - val_loss: 0.5545 - val_accuracy: 0.7620\n",
      "Epoch 2/10\n",
      "20000/20000 [==============================] - 1s 61us/step - loss: 0.4591 - accuracy: 0.8040 - val_loss: 0.4337 - val_accuracy: 0.7990\n",
      "Epoch 3/10\n",
      "20000/20000 [==============================] - 1s 50us/step - loss: 0.3680 - accuracy: 0.8402 - val_loss: 0.4059 - val_accuracy: 0.8088\n",
      "Epoch 4/10\n",
      "20000/20000 [==============================] - 1s 54us/step - loss: 0.3253 - accuracy: 0.8601 - val_loss: 0.3951 - val_accuracy: 0.8146\n",
      "Epoch 5/10\n",
      "20000/20000 [==============================] - 1s 51us/step - loss: 0.2971 - accuracy: 0.8763 - val_loss: 0.3958 - val_accuracy: 0.8150\n",
      "Epoch 6/10\n",
      "20000/20000 [==============================] - 1s 49us/step - loss: 0.2734 - accuracy: 0.8885 - val_loss: 0.4027 - val_accuracy: 0.8168\n",
      "Epoch 7/10\n",
      "20000/20000 [==============================] - 1s 40us/step - loss: 0.2521 - accuracy: 0.8985 - val_loss: 0.4063 - val_accuracy: 0.8118\n",
      "Epoch 8/10\n",
      "20000/20000 [==============================] - 1s 53us/step - loss: 0.2325 - accuracy: 0.9095 - val_loss: 0.4178 - val_accuracy: 0.8130\n",
      "Epoch 9/10\n",
      "20000/20000 [==============================] - 1s 51us/step - loss: 0.2130 - accuracy: 0.9183 - val_loss: 0.4260 - val_accuracy: 0.8094\n",
      "Epoch 10/10\n",
      "20000/20000 [==============================] - 1s 55us/step - loss: 0.1953 - accuracy: 0.9265 - val_loss: 0.4370 - val_accuracy: 0.8090\n",
      "Train on 20000 samples, validate on 5000 samples\n",
      "Epoch 1/10\n",
      "20000/20000 [==============================] - 1s 59us/step - loss: 0.6302 - accuracy: 0.6647 - val_loss: 0.4928 - val_accuracy: 0.7974\n",
      "Epoch 2/10\n",
      "20000/20000 [==============================] - 1s 45us/step - loss: 0.3805 - accuracy: 0.8487 - val_loss: 0.3555 - val_accuracy: 0.8450\n",
      "Epoch 3/10\n",
      "20000/20000 [==============================] - 1s 45us/step - loss: 0.2903 - accuracy: 0.8821 - val_loss: 0.3315 - val_accuracy: 0.8554\n",
      "Epoch 4/10\n",
      "20000/20000 [==============================] - 1s 45us/step - loss: 0.2506 - accuracy: 0.8982 - val_loss: 0.3256 - val_accuracy: 0.8598\n",
      "Epoch 5/10\n",
      "20000/20000 [==============================] - 1s 49us/step - loss: 0.2246 - accuracy: 0.9114 - val_loss: 0.3244 - val_accuracy: 0.8574\n",
      "Epoch 6/10\n",
      "20000/20000 [==============================] - 1s 56us/step - loss: 0.2023 - accuracy: 0.9225 - val_loss: 0.3290 - val_accuracy: 0.8586\n",
      "Epoch 7/10\n",
      "20000/20000 [==============================] - 1s 46us/step - loss: 0.1835 - accuracy: 0.9313 - val_loss: 0.3368 - val_accuracy: 0.8604\n",
      "Epoch 8/10\n",
      "20000/20000 [==============================] - 1s 55us/step - loss: 0.1654 - accuracy: 0.9399 - val_loss: 0.3471 - val_accuracy: 0.8580\n",
      "Epoch 9/10\n",
      "20000/20000 [==============================] - 1s 55us/step - loss: 0.1483 - accuracy: 0.9464 - val_loss: 0.3576 - val_accuracy: 0.8566\n",
      "Epoch 10/10\n",
      "20000/20000 [==============================] - 1s 48us/step - loss: 0.1313 - accuracy: 0.9544 - val_loss: 0.3696 - val_accuracy: 0.8558\n",
      "Train on 20000 samples, validate on 5000 samples\n",
      "Epoch 1/10\n",
      "20000/20000 [==============================] - 1s 62us/step - loss: 0.5987 - accuracy: 0.6896 - val_loss: 0.4066 - val_accuracy: 0.8416\n",
      "Epoch 2/10\n",
      "20000/20000 [==============================] - 1s 73us/step - loss: 0.3122 - accuracy: 0.8784 - val_loss: 0.3057 - val_accuracy: 0.8722\n",
      "Epoch 3/10\n",
      "20000/20000 [==============================] - 1s 61us/step - loss: 0.2367 - accuracy: 0.9077 - val_loss: 0.2828 - val_accuracy: 0.8804\n",
      "Epoch 4/10\n",
      "20000/20000 [==============================] - 1s 53us/step - loss: 0.2005 - accuracy: 0.9245 - val_loss: 0.2865 - val_accuracy: 0.8836\n",
      "Epoch 5/10\n",
      "20000/20000 [==============================] - 1s 72us/step - loss: 0.1760 - accuracy: 0.9324 - val_loss: 0.2811 - val_accuracy: 0.8856\n",
      "Epoch 6/10\n",
      "20000/20000 [==============================] - 1s 55us/step - loss: 0.1568 - accuracy: 0.9412 - val_loss: 0.2910 - val_accuracy: 0.8822\n",
      "Epoch 7/10\n",
      "20000/20000 [==============================] - 1s 63us/step - loss: 0.1402 - accuracy: 0.9489 - val_loss: 0.2931 - val_accuracy: 0.8832\n",
      "Epoch 8/10\n",
      "20000/20000 [==============================] - 1s 66us/step - loss: 0.1246 - accuracy: 0.9557 - val_loss: 0.3016 - val_accuracy: 0.8834\n",
      "Epoch 9/10\n",
      "20000/20000 [==============================] - 1s 69us/step - loss: 0.1099 - accuracy: 0.9621 - val_loss: 0.3136 - val_accuracy: 0.8820\n",
      "Epoch 10/10\n",
      "20000/20000 [==============================] - 1s 60us/step - loss: 0.0957 - accuracy: 0.9668 - val_loss: 0.3329 - val_accuracy: 0.8784\n",
      "Train on 20000 samples, validate on 5000 samples\n",
      "Epoch 1/10\n",
      "20000/20000 [==============================] - 1s 67us/step - loss: 0.5704 - accuracy: 0.7161 - val_loss: 0.3863 - val_accuracy: 0.8386\n",
      "Epoch 2/10\n",
      "20000/20000 [==============================] - 2s 77us/step - loss: 0.2933 - accuracy: 0.8868 - val_loss: 0.2924 - val_accuracy: 0.8796\n",
      "Epoch 3/10\n",
      "20000/20000 [==============================] - 2s 99us/step - loss: 0.2237 - accuracy: 0.9142 - val_loss: 0.2775 - val_accuracy: 0.8852\n",
      "Epoch 4/10\n",
      "20000/20000 [==============================] - ETA: 0s - loss: 0.1891 - accuracy: 0.92 - 2s 78us/step - loss: 0.1898 - accuracy: 0.9280 - val_loss: 0.2715 - val_accuracy: 0.8924\n",
      "Epoch 5/10\n",
      "20000/20000 [==============================] - 1s 72us/step - loss: 0.1659 - accuracy: 0.9373 - val_loss: 0.2759 - val_accuracy: 0.8924\n",
      "Epoch 6/10\n",
      "20000/20000 [==============================] - 2s 80us/step - loss: 0.1461 - accuracy: 0.9470 - val_loss: 0.2795 - val_accuracy: 0.8938\n",
      "Epoch 7/10\n",
      "20000/20000 [==============================] - 1s 73us/step - loss: 0.1301 - accuracy: 0.9540 - val_loss: 0.2939 - val_accuracy: 0.8890\n",
      "Epoch 8/10\n",
      "20000/20000 [==============================] - 1s 71us/step - loss: 0.1154 - accuracy: 0.9595 - val_loss: 0.3034 - val_accuracy: 0.8876\n",
      "Epoch 9/10\n",
      "20000/20000 [==============================] - 1s 75us/step - loss: 0.1013 - accuracy: 0.9661 - val_loss: 0.3140 - val_accuracy: 0.8868\n",
      "Epoch 10/10\n",
      "20000/20000 [==============================] - 1s 63us/step - loss: 0.0879 - accuracy: 0.9705 - val_loss: 0.3206 - val_accuracy: 0.8820\n"
     ]
    }
   ],
   "source": [
    "results = []\n",
    "names = []\n",
    "maxlenLst=[20,50,100,200,300]\n",
    "for i in maxlenLst:\n",
    "    names.append(str(i))\n",
    "    ret = trainEmbed(i, 8)\n",
    "    results.append(ret)\n",
    "    "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#  截取的语句长度对预测准确度的影响\n",
    "显然语句越长，准确度越高，但是到了一定的长度增长不明显"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAbQAAAFRCAYAAAAcvVh3AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYi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xvTduLmGJkkqgndokqQiGGiStI1FxK6IuDki3t/tvpwrA62miLgkIr4TEU9GxF9ExAURMRMRz0bEfd3uX6+KiPMj4kcR8VT1c43jdnYRsTsinjnt9bvGyzE8pe5n0zF7t4gYBP4LcB0wGxFD/Tx2Blp9nwIeysyPA28DvwM0MvMG4KqI2NPV3vWua4FWZu7LzH3AHhy3VVX/B/NnwEXV6ztYMV6dyrrX456w5mfTMVvVtcA/z8wp4C+Bv08fj9353e5Av8jM/3DayyHgnwL/rnr9JDAG/PC97lcfuB64LSLGgVeA/wc8Xr3nuL3bceBO4D9Xr/fx7vH6zQ5l23YMa342HbMOMvOvACLi77F8l7aLPv735h3aOkXEDcAg8AbwZlV8BNjdtU71theAmzLzOmAAuBXHbVWZ+U5m/uy0oot493h1Ktv21vhsOmariIhg+T+iFoGkj8fOQFuHiNgFTAOfAY4CF1ZvXYxjuZqXM/Ot6rjN8vPhHLf6Ov0789/eCjU+m47ZKnLZPcDLwMfo47Hr2Y71moi4APgG8MXMfB04zPKtN8Be4LUuda3XPRoReyOiAdwO3IPjth6d/p35b+80NT+bjlkHEfGvI+L3qpeXAg/Sx2PnGlp9E8CHgWZENIGvAXdFxGUsT6Nd383O9bAHgMeAAL4JPAE847jV1mm8skPZdlbns+mYdXYQeDwiPgu8yvK/t6f7dex8Usg5qHak3Qw8nZlvd7s//cJxW59O4+UYnp1jtnH9PHYGmiSpCK6hSZKKYKBJkopgoEmSimCgSZKKYKBJkorw/wHRm+ZANPgQrgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 504x360 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.rcParams['font.sans-serif'] = ['KaiTi']#作图的中文\n",
    "plt.rcParams['font.serif'] = ['KaiTi']#作图的中文\n",
    "fig = plt.figure(figsize=(7,5))\n",
    "fig.suptitle('对比')\n",
    "ax = fig.add_subplot(111)\n",
    "plt.boxplot(results)\n",
    "ax.set_xticklabels(names)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Train on 20000 samples, validate on 5000 samples\n",
      "Epoch 1/10\n",
      "20000/20000 [==============================] - 2s 91us/step - loss: 0.5679 - accuracy: 0.7214 - val_loss: 0.3786 - val_accuracy: 0.8518\n",
      "Epoch 2/10\n",
      "20000/20000 [==============================] - 2s 87us/step - loss: 0.2999 - accuracy: 0.8798 - val_loss: 0.3031 - val_accuracy: 0.8718\n",
      "Epoch 3/10\n",
      "20000/20000 [==============================] - 2s 81us/step - loss: 0.2328 - accuracy: 0.9084 - val_loss: 0.2801 - val_accuracy: 0.8872\n",
      "Epoch 4/10\n",
      "20000/20000 [==============================] - 2s 85us/step - loss: 0.1996 - accuracy: 0.9224 - val_loss: 0.2789 - val_accuracy: 0.8908\n",
      "Epoch 5/10\n",
      "20000/20000 [==============================] - 2s 80us/step - loss: 0.1777 - accuracy: 0.9324 - val_loss: 0.2831 - val_accuracy: 0.8898\n",
      "Epoch 6/10\n",
      "20000/20000 [==============================] - 2s 88us/step - loss: 0.1602 - accuracy: 0.9392 - val_loss: 0.3013 - val_accuracy: 0.8840\n",
      "Epoch 7/10\n",
      "20000/20000 [==============================] - 2s 86us/step - loss: 0.1452 - accuracy: 0.9460 - val_loss: 0.2947 - val_accuracy: 0.8876\n",
      "Epoch 8/10\n",
      "20000/20000 [==============================] - 2s 100us/step - loss: 0.1305 - accuracy: 0.9525 - val_loss: 0.3038 - val_accuracy: 0.8856\n",
      "Epoch 9/10\n",
      "20000/20000 [==============================] - 1s 75us/step - loss: 0.1160 - accuracy: 0.9580 - val_loss: 0.3110 - val_accuracy: 0.8844\n",
      "Epoch 10/10\n",
      "20000/20000 [==============================] - 2s 76us/step - loss: 0.1024 - accuracy: 0.9646 - val_loss: 0.3330 - val_accuracy: 0.8754\n",
      "Train on 20000 samples, validate on 5000 samples\n",
      "Epoch 1/10\n",
      "20000/20000 [==============================] - 2s 84us/step - loss: 0.5989 - accuracy: 0.6938 - val_loss: 0.4149 - val_accuracy: 0.8384\n",
      "Epoch 2/10\n",
      "20000/20000 [==============================] - 2s 79us/step - loss: 0.3167 - accuracy: 0.8771 - val_loss: 0.3068 - val_accuracy: 0.8732\n",
      "Epoch 3/10\n",
      "20000/20000 [==============================] - 2s 82us/step - loss: 0.2366 - accuracy: 0.9083 - val_loss: 0.2893 - val_accuracy: 0.8782\n",
      "Epoch 4/10\n",
      "20000/20000 [==============================] - 2s 78us/step - loss: 0.1991 - accuracy: 0.9245 - val_loss: 0.2774 - val_accuracy: 0.8866\n",
      "Epoch 5/10\n",
      "20000/20000 [==============================] - 2s 83us/step - loss: 0.1714 - accuracy: 0.9359 - val_loss: 0.2795 - val_accuracy: 0.8874\n",
      "Epoch 6/10\n",
      "20000/20000 [==============================] - 2s 78us/step - loss: 0.1501 - accuracy: 0.9459 - val_loss: 0.2856 - val_accuracy: 0.8874\n",
      "Epoch 7/10\n",
      "20000/20000 [==============================] - 2s 77us/step - loss: 0.1307 - accuracy: 0.9537 - val_loss: 0.2962 - val_accuracy: 0.8858\n",
      "Epoch 8/10\n",
      "20000/20000 [==============================] - 2s 84us/step - loss: 0.1132 - accuracy: 0.9612 - val_loss: 0.3042 - val_accuracy: 0.8868\n",
      "Epoch 9/10\n",
      "20000/20000 [==============================] - 2s 80us/step - loss: 0.0978 - accuracy: 0.9675 - val_loss: 0.3175 - val_accuracy: 0.8828\n",
      "Epoch 10/10\n",
      "20000/20000 [==============================] - 2s 82us/step - loss: 0.0837 - accuracy: 0.9730 - val_loss: 0.3307 - val_accuracy: 0.8834\n",
      "Train on 20000 samples, validate on 5000 samples\n",
      "Epoch 1/10\n",
      "20000/20000 [==============================] - 2s 93us/step - loss: 0.5827 - accuracy: 0.7118 - val_loss: 0.3968 - val_accuracy: 0.8438\n",
      "Epoch 2/10\n",
      "20000/20000 [==============================] - 2s 78us/step - loss: 0.3074 - accuracy: 0.8798 - val_loss: 0.2978 - val_accuracy: 0.8814\n",
      "Epoch 3/10\n",
      "20000/20000 [==============================] - 2s 82us/step - loss: 0.2349 - accuracy: 0.9077 - val_loss: 0.2832 - val_accuracy: 0.8854\n",
      "Epoch 4/10\n",
      "20000/20000 [==============================] - 2s 80us/step - loss: 0.2005 - accuracy: 0.9235 - val_loss: 0.2792 - val_accuracy: 0.8842\n",
      "Epoch 5/10\n",
      "20000/20000 [==============================] - 2s 79us/step - loss: 0.1770 - accuracy: 0.9337 - val_loss: 0.2800 - val_accuracy: 0.8884\n",
      "Epoch 6/10\n",
      "20000/20000 [==============================] - 2s 85us/step - loss: 0.1575 - accuracy: 0.9427 - val_loss: 0.2900 - val_accuracy: 0.8850\n",
      "Epoch 7/10\n",
      "20000/20000 [==============================] - 2s 94us/step - loss: 0.1400 - accuracy: 0.9498 - val_loss: 0.3026 - val_accuracy: 0.8828\n",
      "Epoch 8/10\n",
      "20000/20000 [==============================] - 2s 100us/step - loss: 0.1247 - accuracy: 0.9560 - val_loss: 0.3134 - val_accuracy: 0.8820\n",
      "Epoch 9/10\n",
      "20000/20000 [==============================] - 2s 91us/step - loss: 0.1093 - accuracy: 0.9618 - val_loss: 0.3112 - val_accuracy: 0.8834\n",
      "Epoch 10/10\n",
      "20000/20000 [==============================] - 2s 89us/step - loss: 0.0951 - accuracy: 0.9687 - val_loss: 0.3278 - val_accuracy: 0.8810\n",
      "Train on 20000 samples, validate on 5000 samples\n",
      "Epoch 1/10\n",
      "20000/20000 [==============================] - 2s 122us/step - loss: 0.6022 - accuracy: 0.6892 - val_loss: 0.4196 - val_accuracy: 0.8380\n",
      "Epoch 2/10\n",
      "20000/20000 [==============================] - 2s 110us/step - loss: 0.3202 - accuracy: 0.8756 - val_loss: 0.3032 - val_accuracy: 0.8790\n",
      "Epoch 3/10\n",
      "20000/20000 [==============================] - 2s 109us/step - loss: 0.2376 - accuracy: 0.9082 - val_loss: 0.2811 - val_accuracy: 0.8844\n",
      "Epoch 4/10\n",
      "20000/20000 [==============================] - 2s 93us/step - loss: 0.1981 - accuracy: 0.9244 - val_loss: 0.2812 - val_accuracy: 0.8850\n",
      "Epoch 5/10\n",
      "20000/20000 [==============================] - 2s 100us/step - loss: 0.1712 - accuracy: 0.9348 - val_loss: 0.2822 - val_accuracy: 0.8890\n",
      "Epoch 6/10\n",
      "20000/20000 [==============================] - 2s 90us/step - loss: 0.1496 - accuracy: 0.9455 - val_loss: 0.2887 - val_accuracy: 0.8832\n",
      "Epoch 7/10\n",
      "20000/20000 [==============================] - 2s 79us/step - loss: 0.1302 - accuracy: 0.9535 - val_loss: 0.2971 - val_accuracy: 0.8842\n",
      "Epoch 8/10\n",
      "20000/20000 [==============================] - 2s 83us/step - loss: 0.1136 - accuracy: 0.9609 - val_loss: 0.3068 - val_accuracy: 0.8820\n",
      "Epoch 9/10\n",
      "20000/20000 [==============================] - 2s 78us/step - loss: 0.0978 - accuracy: 0.9681 - val_loss: 0.3223 - val_accuracy: 0.8812\n",
      "Epoch 10/10\n",
      "20000/20000 [==============================] - 2s 81us/step - loss: 0.0843 - accuracy: 0.9730 - val_loss: 0.3368 - val_accuracy: 0.8822\n",
      "Train on 20000 samples, validate on 5000 samples\n",
      "Epoch 1/10\n",
      "20000/20000 [==============================] - 2s 84us/step - loss: 0.5883 - accuracy: 0.7042 - val_loss: 0.3973 - val_accuracy: 0.8488\n",
      "Epoch 2/10\n",
      "20000/20000 [==============================] - 2s 81us/step - loss: 0.3075 - accuracy: 0.8790 - val_loss: 0.2983 - val_accuracy: 0.8786\n",
      "Epoch 3/10\n",
      "20000/20000 [==============================] - 2s 83us/step - loss: 0.2347 - accuracy: 0.9068 - val_loss: 0.2794 - val_accuracy: 0.8874\n",
      "Epoch 4/10\n",
      "20000/20000 [==============================] - 2s 89us/step - loss: 0.2005 - accuracy: 0.9235 - val_loss: 0.2798 - val_accuracy: 0.8812\n",
      "Epoch 5/10\n",
      "20000/20000 [==============================] - 2s 80us/step - loss: 0.1773 - accuracy: 0.9341 - val_loss: 0.2804 - val_accuracy: 0.8866\n",
      "Epoch 6/10\n",
      "20000/20000 [==============================] - 2s 81us/step - loss: 0.1585 - accuracy: 0.9426 - val_loss: 0.2934 - val_accuracy: 0.8832\n",
      "Epoch 7/10\n",
      "20000/20000 [==============================] - 2s 84us/step - loss: 0.1415 - accuracy: 0.9489 - val_loss: 0.2953 - val_accuracy: 0.8850\n",
      "Epoch 8/10\n",
      "20000/20000 [==============================] - 2s 78us/step - loss: 0.1263 - accuracy: 0.9550 - val_loss: 0.3043 - val_accuracy: 0.8816\n",
      "Epoch 9/10\n",
      "20000/20000 [==============================] - 2s 79us/step - loss: 0.1113 - accuracy: 0.9607 - val_loss: 0.3120 - val_accuracy: 0.8840\n",
      "Epoch 10/10\n",
      "20000/20000 [==============================] - 2s 78us/step - loss: 0.0968 - accuracy: 0.9674 - val_loss: 0.3292 - val_accuracy: 0.8772\n"
     ]
    }
   ],
   "source": [
    "results = []\n",
    "names = []\n",
    "vecLenLst=[8,16,32,64,128]\n",
    "for i in vecLenLst:\n",
    "    names.append(str(i))\n",
    "    ret = trainEmbed(200,i)\n",
    "    results.append(ret)\n",
    "    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [],
   "source": [
    "names = ['0']+names"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 不同词向量对分类的影响\n",
    "总体影响并不是很大，从图中可以看出32长度的词向量性能最好。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXgAAAD2CAYAAADcUJy6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAASkUlEQVR4n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6RJyKiMc7XUu7RcRARLwUETMR8Wyn62mniNgZESeXzHsmIj7SqZraISIGgH8A7gKmImJXRPxTRJyIiL+LiHd1uMS2WLqvqv35zU7WtF6L35MR8e6l+63kz2MjHQ/4iLgf6MvM/cDuiNjT6Zra7DDwQjUOd1tEFDEetwrBrwBbFs27B3hPZn69Y4W1x/uARzNzAvhn4GPAFzLzV4HzwL2dLK4dmuyrzwO3dKikdWvwnvxdrt9vRX4em+l4wAMHgOPV9AlgpHnTnvQmMBwR24HbgTc6XE+7vA38NnAJICL6geeAsxHx0U4Wtl6Z+a+Z+WpE/ArzR/HPZ+a/VIsHgR92rrr1a7SvIuJDwE+ZD8Jedc17MjOfabDfSv08NtQNAb8FOFdNXwB2drCWjTAN7AIeAWaZ38ael5mXMvMni2Z9Evgu8BRwV0Qc6Uxl7RERwXxYXASuVPP2AwOZ+Wona2uDpfvqD4BPA491tKp1avCeBK7bb0V+HpvphoC/zNXTwq10R03tdBR4KDM/B3wPeKDD9WyUDwDHMvM88DVgdIX2XS3nPQz8F/CbEbEDeBr4vc5W1hZL99VfAs9k5o87W1b7Ndhvm+XzCHRHmJ7marfMPuBs50rZEAPA3ojoA+4GSv3hwQ+A3dV0DXi9g7WsS0T8UUR8svrnduDHwN8Af5yZPbtdiyzdV98GHo6Il4H3R8SXOlVYO1UXw5fut83yeQS64IdOEXErcBL4BnAf8MFGp1m9KiLuAp5n/rTwFPDxzLzc2araJyJezswDEbEN+DLzXWz9wCcy89zya3en6mLdceBngTPAd4A/Yz4IAb6YmX/dofLWbbl9tbA/O1jeui16T36KJfsN+G8K/jwu1fGAh3c+UAeBV6rTRknSOnVFwEuS2q8b+uAlSRvAgJekQhnwklQoA16SCmXAS1Kh/h83pTfwBIydTQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "fig.suptitle('不同词向量长度对比')\n",
    "plt.boxplot(results)\n",
    "plt.xticks(range(len(names)+1),names)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "keras",
   "language": "python",
   "name": "keras"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
